package cn.neusoft.neusoft_fz.controller;

import cn.neusoft.neusoft_fz.common.ResponseEntity;
import cn.neusoft.neusoft_fz.service.SubstationService;
import org.example.entity.Substation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/substation")
@RestController
public class SubstationController {
    @Autowired
    SubstationService substationService;

    @GetMapping("/all")
    public ResponseEntity<List<Substation>> getall(){
        List<Substation> list = substationService.list_redis();
        return ResponseEntity.success(list);
    }
}
